package com.luboyan.CBillbill.dao.file;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;
import java.util.List;

/**
 * 视频文件
 */
@Data
@Document(indexName = "videos")
public class Video {

    @Id
    @TableId(type = IdType.AUTO)
    private Long id;

    @Field(type = FieldType.Long)
    private Long userId;

    private String url;

    private String thumbnail;

    @Field(type = FieldType.Text)
    private String title;

    private String type;

    private String duration;

    private String area;

    @Field(type = FieldType.Text)
    private String description;

    @Field(type = FieldType.Date)
    private Date createTime;

    @Field(type = FieldType.Date)
    private Date updateTime;

    @TableField(exist = false)
    private List<VideoTag> videoTagList;
}
